Introduce WinGet Command Not Found PowerShell Module#1
Introduce WinGet Command Not Found PowerShell Module#1carlos-zamora wants to merge 20 commits intomainfrom
Conversation
change to use sqlite directly
update to new path for db
|
There's still an issue where the feedback provider won't work for the first 2 to 3 seconds. I tried adding a singleton class for the COM objects but it looks like that didn't resolve the issue. Not sure what can be done here to get around that issue. Open to suggestions. |
| var catalogRef = WinGetComObjects.Singleton.packageManager.GetPredefinedPackageCatalog(PredefinedPackageCatalog.OpenWindowsCatalog); | ||
| var connectResult = catalogRef.Connect(); |
There was a problem hiding this comment.
There's still an issue where the feedback provider won't work for the first 2 to 3 seconds.
Which takes more the time? The initialization of WinGetComObjects.Singleton, or connect() call?
For the WinGetComObjects initialization, you should be able to do it in OnImport(), on a thread-pool thread. Or, this can be done in the constructor of WinGetCommandNotFoundFeedbackPredictor -- call a method to create the singleton of WinGetComObjects on a background thread.
In that way, you won't block the module load, but is able kick off the initialization in the background, so when the first trigger comes, the initialization is likely already done.
No description provided.